<?php
/**
 * Delivery Request
 */
class DeR extends AppModel {
    var $name = 'DeR';

    var $useTable = 'delivery_requests';

    var $belongsTo = array(
        'DeRH' => array(
            'foreignKey' => 'delivery_request_head_id'
        ),
        'Product', 'CustProductSite'
    );

    var $validate = array(
        'request_qty' => array(
            'rule' => 'numeric',
            'message' => 'Please input request qty.',
            'on' => 'create',
            'required' => true
        ),
        'product_id' => array(
            'rule' => 'notEmpty',
            'message' => 'Please input product id.',
            'on' => 'create',
            'required' => true
        ),
        'cust_product_site_id' => array(
            'rule' => 'notEmpty',
            'message' => 'Please input cust product site.',
            'on' => 'create',
            'required' => true
        ),
        'price' => array(
            'rule' => 'numeric',
            'message' => 'Please input product price.',
            'on' => 'create'
        ),
    );
}
?>
